#!/bin/csh -f

set inp = "undefined"
if ($#argv == 1) then
  set inp = $1
endif

if ("$inp" != "-nomodules") then

# Init conda
if ! $?CONDA_EXE then
  echo ""
  echo "${0}: conda executable not found, see the Icepack documentation for how to initialize your login shell to use conda"
  echo ""
  exit 1
endif
source `$CONDA_EXE info --base`/etc/profile.d/conda.csh
# Activate "icepack" conda environment
conda activate icepack
if $status then
  echo ""
  echo "${0}: 'icepack' conda environment not found, see the Icepack documentation for how to create the conda icepack env"
  echo ""
  exit 1
endif

endif

setenv ICE_MACHINE_MACHNAME conda
setenv ICE_MACHINE_MACHINFO "Generic conda setup"
setenv ICE_MACHINE_ENVNAME macos
setenv ICE_MACHINE_ENVINFO "(NOTE: may vary) GNU Fortran 7.3.0, clang 9.0.1"
setenv ICE_MACHINE_MAKE make
setenv ICE_MACHINE_WKDIR  $HOME/icepack-dirs/runs
setenv ICE_MACHINE_INPUTDATA $HOME/icepack-dirs/input
setenv ICE_MACHINE_BASELINE $HOME/icepack-dirs/baseline
setenv ICE_MACHINE_SUBMIT " "
setenv ICE_MACHINE_TPNODE 4
setenv ICE_MACHINE_ACCT P0000000
setenv ICE_MACHINE_QUEUE "debug"
setenv ICE_MACHINE_BLDTHRDS 4
setenv ICE_MACHINE_QSTAT " "

